package com.yykj.hospital.server.model.repository.banci;

import com.yykj.common.enums.BanCiType;
import com.yykj.hospital.server.model.entity.banci.HospitalDoctorVisitSetting;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HospitalDoctorVisitSettingRepository extends JpaRepository<HospitalDoctorVisitSetting,Integer>, JpaSpecificationExecutor<HospitalDoctorVisitSetting> {
    List<HospitalDoctorVisitSetting> findAllByHospitalIdAndType(Integer hospitalId,BanCiType type);
    List<HospitalDoctorVisitSetting> findAllByHospitalIdAndTypeAndDoctorIdIn(Integer hospitalId, BanCiType type, List<String> doctorIds);

    HospitalDoctorVisitSetting findFirstByHospitalIdAndDoctorIdAndBanCiId(Integer hospitalId,String doctorId,Integer banCiId);
}
